request appleEvent
Type
command
Summary
Gets data about an Apple Event that was sent to LiveCode.
Syntax
request appleEvent {class|ID|sender|returnID|data [with keyword <aeKey>]}
Description
Use the request appleEvent command from within an appleEvent handler to extract information about a pending Apple event.
When a program sends an Apple event, it includes several different pieces of information. Each piece corresponds to an Apple event keyword. Use the request appleEvent data with aeKey form of this command to specify which pieces you want to get.
-
The form request appleEvent class is equivalent to request appleEvent data with keyword "evcl". It gets the four-character class the Apple event belongs to (for example, misc or aevt).
-
The form request appleEvent ID is equivalent to request appleEvent data with keyword "evid". It gets the four-character name of the specific Apple event (for example, dosc or eval).
-
The form request appleEvent sender is equivalent to request appleEvent data with keyword "addr". It gets the AppleTalk address of the program that sent the Apple event to LiveCode.
-
The form request appleEvent returnID is equivalent to request appleEvent data with keyword "rtid". It gets the Apple event's return ID number.
-
The form request appleEvent data gets the data associated with the Apple event. The meaning of this data depends on which kind of Apple event is being handled. For example, the odoc (open document) event sends the file path of the document being opened as the Apple event data.
For more information about Apple events, refer to the section entitled "Apple Events Sent by the Mac OS" in the technical documentation section located on [Apple's website] (https://developer.apple.com/documentation/coreservices/apple_events).
Parameters
Name | Type | Description |
---|---|---|
aeKey | An Apple event keyword. If you do not specify an aeKey (or any of the specific forms of the command), the request appleEvent command gets the data attached to the Apple event. |
Examples
request appleEvent class
request appleEvent data
request appleEvent data with keyword "timo"
Related
command: send to program
glossary: handler, Apple Event, variable, command
keyword: it
message: appleEvent
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
Platforms
desktop